﻿@model InfoTech.VinhSon.Models.CSectionModel
@{
    ViewBag.Title = "Add Document";
    Layout = "~/Areas/Administrator/Views/Shared/_Dialog.cshtml";
}
@section script
{
    <script src="@Url.Content("~/Scripts/ckeditor/ckeditor.js")"> </script>
    <script src="@Url.Content("~/Areas/Administrator/Content/js/htmleditor.js")"> </script>
    <script type="text/javascript">
        $(document).ready(function() {
            @if(true == ViewBag.Completed)
            {
                @:window.parent.closeWindowAddDocument(true);
            };
        });
    </script>
}
<form class="stdform stdform2" enctype="multipart/form-data" method="POST">
    @Html.HiddenFor(c => c.CategoryId)
    <p>
        <label>
            Name</label>
        <span class="field">
            @Html.TextBoxFor(c => c.Name,
                             new
                                 {
                                         @class = "input-xlarge",
                                         placeholder = "Name"
                                 })
            @Html.ValidationMessageFor(c => c.Name)
        </span>
    </p>
    <p>
        <label>
            Document</label>
        <span class="field">
            <input name="upload" type="file" />
            @Html.ValidationMessageFor(c => c.Url)
        </span>
    </p>
    <p>
        <label>
            TypeDocument Type</label>
        <span class="field">
            @Html.CheckBoxFor(c => c.Word) Word
            @Html.CheckBoxFor(c => c.Pdf) Pdf
            @Html.CheckBoxFor(c => c.PowerPoint) Power Point
            @Html.CheckBoxFor(c => c.Video) Video
            @Html.CheckBoxFor(c => c.Other) Other </span>
    </p>
    <p>
        <label>
            Width</label>
        <span class="field">
            @Html.TextBoxFor(c => c.Width,
                             new
                                 {
                                         @class = "input-xlarge",
                                         placeholder = "Width"
                                 })
            @Html.ValidationMessageFor(c => c.Width)
        </span>
    </p>
    <p>
        <label>
            Height</label>
        <span class="field">
            @Html.TextBoxFor(c => c.Height,
                             new
                                 {
                                         @class = "input-xlarge",
                                         placeholder = "Height"
                                 })
            @Html.ValidationMessageFor(c => c.Height)
        </span>
    </p>
    <p>
        <label>
            Priority</label>
        <span class="field">
            @Html.TextBoxFor(c => c.Priority,
                             new
                                 {
                                         @class = "input-xlarge",
                                         placeholder = "Priority"
                                 })
            @Html.ValidationMessageFor(c => c.Priority)
        </span>
    </p>
    <p>
        <label>
            Detail</label>
        <div class="field">
            @Html.TextAreaFor(c => c.Detail,
                              new
                                  {
                                          @class = "input-xlarge html-editor",
                                          placeholder = "Detail"
                                  })
            @Html.ValidationMessageFor(c => c.Detail)
        </div>
    </p>
    <p>
    <label>
        Activated</label>
    <span class="field">
        @Html.CheckBoxFor(c => c.Activated)
        @Html.ValidationMessageFor(c => c.Activated)
    </span>
</p>
    <p class="stdformbutton">
        <label>
        </label>
        <input type="submit" value="Insert New" class="btn btn-primary" />
        <input type="button" class="btn" value="Cancel" onclick=" window.parent.closeWindowAddDocument(); " />
    </p>
</form>